package cn.appsys.service.impl;

import cn.appsys.dao.backendUserDao.BackendUserMapper;
import cn.appsys.pojo.BackendUser;
import cn.appsys.service.BackendUserService;
import org.apache.log4j.Logger;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

@Service("BackendUserService")
public class BackendUserServiceImpl implements BackendUserService {

    private static final Logger LOGGER = Logger.getLogger(BackendUserServiceImpl.class);
    @Resource
    private BackendUserMapper backendUserMapper;


    @Override
    public BackendUser loginFlag(String userCode, String userPassword) {
        String password=null;
        BackendUser backendUser =new BackendUser();
        try {

            backendUser = backendUserMapper.findPWDbyUsername(userCode);
            backendUser.getUserPassword();

        }catch (Exception e) {
            LOGGER.error("UserServiceImpl.getAllUser 异常：" + e.getMessage());
            //return userList;
        }
//        if( password == null || password.equals("") || !password.equals(userPassword)){
//            LOGGER.error("查询到的密码：" +password+"用户输入的密码："+userPassword);
//            return false;
//        }else {
//            return true;
//        }
//
        return backendUser;
    }
}
